<template>
    <div class="list">
        <input type="text" v-model="num">
    </div>
</template>
<script>
import {ref,reactive,toRefs,watch,watchEffect,onActivated,onDeactivated} from 'vue'
export default {
    name: 'list',//当前组件的名字
    setup(props) {
        const num = ref('')
        onActivated(()=>{
            console.log('激活');
        })
        onDeactivated(()=>{
            console.log('停用');
        })
        return {num}
    }
}
</script>